{% extends 'djangobb_forum/base.html' %}
{% load pagination_tags %}
{% load forum_extras %}
{% load i18n %}

{% block content %}
{% autopaginate topics forum_settings.FORUM_PAGE_SIZE %}
<div class="linkst">
	<div class="inbox">
		<div class="pagelink conl">{% paginate %}</div>
		<ul><li><a href="{% url djangobb:index %}">{% trans "Root" %}</a> </li><li>&raquo; {{ forum }}</li></ul>
		<div class="clearer"></div>
	</div>
</div>

<form method="post">
{% csrf_token %}
<div id="vf" class="blocktable">
	<h2><span>{{ forum }}</span></h2>
	<div class="box">
		<div class="inbox">
			<table cellspacing="0">
			<thead>
				<tr>
					<th class="tcl" scope="col">{% trans "Topic" %}</th>
					<th class="tc2" scope="col">{% trans "Replies" %}</th>
					<th class="tc3" scope="col">{% trans "Views" %}</th>
					<th class="tcr">{% trans "Last post" %}</th>
					<th class="tcmod" scope="col">{% trans "Select" %}</th>
				</tr>
			</thead>
			<tbody>
			{% if topics %}
				{% for topic in topics %}
					<tr>
						<td class="tcl">
							<div class="intd">
								<div {% if topic.sticky %}class="sticky"{% else %}{% if topic.closed %}class="closed"{% else %}{% if topic|has_unreads:user %}class="inew"{% else %}class="icon"{% endif %}{% endif %}{% endif %}><div class="nosize"><!-- --></div></div>
								<div class="tclcon">
									{% if topic.sticky %}
										{% trans "Sticky:" %}
									{% endif %}
									{% if topic|has_unreads:user %}
										<strong>{% link topic %} <span class="byuser">{% trans "by" %} {{ topic.user.username }}</span></strong>
									{% else %}
										{% link topic %} <span class="byuser">{% trans "by" %} {{ topic.user.username }}</span>
									{% endif %}
								</div>
							</div>
						</td>
						<td class="tc2">{{ topic.reply_count }}</td>
						<td class="tc3">{{ topic.views }}</td>
						<td class="tcr"><a href="{{ topic.get_absolute_url }}">{% forum_time topic.updated %}</a> <span class="byuser">{% trans "by" %} {{ topic.last_post.user.username }}</span></td>
						<td class="tcmod"><input type="checkbox" name="topic_id" value="{{ topic.id }}" /></td>
					</tr>
				{% endfor %}
			{% else %}
				<tr><td class="djangobbcon1" colspan="4">{% trans "Forum is empty." %}</td></tr>
			{% endif %}
			</tbody>
			</table>
		</div>
	</div>
</div>
<div class="linksb">
	<div class="inbox">
		<div class="pagelink conl">{% paginate %}</div>
		<p class="conr">
			<input type="submit" name="move_topics" value="{% trans "Move" %}" />&nbsp;&nbsp;
			<input type="submit" name="delete_topics" value="{% trans "Delete" %}" />&nbsp;&nbsp;
			<input type="submit" name="open_topics" value="{% trans "Open" %}" />&nbsp;&nbsp;
			<input type="submit" name="close_topics" value="{% trans "Close" %}" />
		</p>
		<div class="clearer"></div>
	</div>
</div>
</form>
{% endblock %}

{% block controls %}
{% endblock %}
